import request from '@/utils/request'

export default {
  findTreeByGroupId(groupId) {
    return request({
      method: 'get',
      url: '/hnister-setting-service/rest/pb/menuTree/groupId/' + groupId
    })
  },
  findListByGroupId(groupId) {
    return request({
      method: 'get',
      url: '/hnister-setting-service/rest/pb/menuList/groupId/' + groupId
    })
  },
  add: function(menu) {
    return request({
      method: 'post',
      url: '/hnister-setting-service/rest/pt/menu',
      data: menu
    })
  },
  remove: function(id) {
    return request({
      method: 'delete',
      url: '/hnister-setting-service/rest/pt/menu/' + id
    })
  }
}

